home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / utils / txtab605.zip / XWPTABLE.DOC < prev    next >
Text File  |  1996-03-24  |  4KB  |  90 lines

  1. XWPTABLE.DOC
  2. 03/24/96
  3.  
  4. This is a fairly stupid program that tries to go through a WordPerfect file and
  5. retrieve any table cells that it can find.
  6.  
  7. This program is totally worthless without the TXTABLE.EXE program (which should
  8. have also been included in the ZIP with HTMSTRIP.EXE).  It *may* be worthless
  9. even without TXTABLE.EXE.  :)
  10.  
  11. This is just a test program.  I intend to use the code in another program (maybe
  12. HTMSTRIP or TXTABLE) and just wanted to see what was possible.  It's mainly here
  13. so people can test it if they want and let me know if it works with different
  14. versions of WordPerfect.  (See my contact information at the end.)
  15.  
  16. I also have no idea what the actual format for a WordPerfect file is.  I did
  17. some guestimations to come up with this program.  I have no idea, for example,
  18. of how to tell how big the table actually is (how many rows or columns) although
  19. I'm sure that information is in the table itself.  The program also doesn't
  20. really know when a new table starts so if you have more than one table in a
  21. document, it will probably write everything out as one file.
  22.  
  23. If anyone knows detailed information about the WordPerfect file format, please
  24. let me know.  If you have similar information for other mainstream word
  25. processing files, I'd also be interested.  (Again, see contact information at
  26. the end.)
  27.  
  28. I've tested this program with a grand total of three WordPerfect 5.1 for DOS
  29. files and it seemed to pull off the cells okay but even then I notice that it
  30. missed some of the cells.  At least it won't screw up your files.
  31.  
  32.  
  33. Well, after that tremendous build-up, how does the program work?
  34.  
  35. XWPTABLE.EXE goes through a WordPerfect input file, tries to pick out the cells,
  36. and rewrites them in a text file (called, by default, infile.TST).  This file
  37. should be directly usable by the TXTABLE.EXE program.
  38.  
  39. Based on the number of cells found, the program tries to guess how many columns
  40. it ran into.  (Again, it doesn't really know.) The calculation for this is
  41. fairly simple; it looks at the number of cells it found and figures there has to
  42. be the same number in each row.  It tries all cells per row combinations from 1
  43. to 15 and reports on any where the number evenly goes into the total number of
  44. cells.  Unless you know the dimensions of the table better, you can try TXTABLE
  45. using these column specs and the /DEBUG option to see if it got it correct.
  46.  
  47. One user, Charles Everitt, has reported that while XWPTABLE works, it's actually
  48. easier to writet the WordPerfect file out to a text file using WordPerfect
  49. itself (TextOut), and then take the resulting file (which will have
  50. formfeeds--decimal 12's--between each cell) and feed that into TXTABLE directly.
  51. (Converting the characters can be done with the freebie CHANGE or FIXTEXT
  52. programs from Wayne Software.  Check them out from the Web site
  53. http://hjs.geol.uib.no/guthrie/
  54.  
  55.  
  56. Syntax:
  57.  
  58.     XWPTABLE infile [ outfile ] [ /EXT=.xxx ] [ /? ]
  59.  
  60. where:
  61.  
  62. "infile" is the name of WordPerfect 5.1 input file to process.  It might work
  63. with other versions of WordPerfect.  I dunno!
  64.  
  65. "outfile" is the name of the TXTABLE input file to create.  Is overwritten if it
  66. exists already.  If no output file name is provided, the routine will use the
  67. infile and provide an extension of *.TST.  (The default .TST extension can be
  68. overridden using the /EXT=.xxx parameter.)
  69.  
  70. "/EXT=.xxx" allows you to specify a different default file extension for the
  71. output file.  This parameter only matters if you do not explicitly specify an
  72. output file name.  The default value is "/EXT=.TST".
  73.  
  74. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  75.  
  76.  
  77. Author:
  78.  
  79. This program was written by Bruce Guthrie.  This is a test program only.  I
  80. wouldn't recommend distributing it since it won't be around for long.  But I
  81. would love to know any and all of the following:
  82.  
  83.   (a) Did it work for you?
  84.   (b) Did you try it with something other than WordPerfect 5.1 tables?
  85.   (c) Do you have any information about the formats for these files?
  86.  
  87. Please e-mail comments to me at bguthrie@nmaa.org.
  88.  
  89. Thanks!
  90.